//
// Created by 郝羽 on 2018/5/14.
//

#ifndef RTC_XSWITCH2_RTP_HPP
#define RTC_XSWITCH2_RTP_HPP

#include <cstdint>

uint16_t  rtp_get_seq(unsigned char* buf, int len);
void rtp_set_seq(unsigned char* buf, int len, uint16_t seq);
bool rtp_get_p(unsigned char* buf, int len);
void rtp_set_p(unsigned char* buf, int len, bool p);
bool rtp_get_x(unsigned char* buf, int len);
void rtp_set_x(unsigned char* buf, int len, bool x);
uint8_t rtp_get_cc(unsigned char* buf, int len);
void rtp_set_cc(unsigned char* buf, int len, uint8_t cc);
uint32_t rtcp_get_ssrc(const unsigned char *buf, int size);
uint32_t rtp_get_ssrc(const unsigned char* buf, int size);
void rtp_set_ssrc(unsigned char* buf, int size, uint32_t ssrc);
uint8_t rtp_get_pt(const unsigned char* buf, int size);
bool is_rtcp(const unsigned char* data, int len);

#endif //RTC_XSWITCH2_RTP_HPP
